<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@include file="../common/jspcommon.jsp"%>
<%@include file="../common/jscss.jsp"%>
<style type="text/css">
    .l-table-edit {font-size: 12px;margin: auto;}
 	.l-table-edit-td{ padding:4px;}
    .l-button-submit,.l-button-test{width:80px; float:left; margin-left:10px; padding-bottom:2px;}
    .l-verify-tip{ left:230px; top:120px;}
    .error{color:red}
</style>
<script type="text/javascript">

</script>

<div style="float: left;">
	<form name="saveForm" method="post" action="/misc/config/saveConfig.htm" id="save_form">
	<table cellpadding="0" cellspacing="0" class="l-table-edit">
		<tr>
			<td align="right" class="l-table-edit-td">
				客服电话:
			</td>
			<td align="left" class="l-table-edit-td">
				<input name="servicePhone" type="text" id="service_phone" value="${servicePhone.value}"/>
			</td>
			<td align="left"></td>
			<%--<td align="right" class="l-table-edit-td">
				所属景点:
			</td>
			<td align="left" class="l-table-edit-td">
				<input name="scenic" type="text" id="scenic" value="${ticket.scenic}" ltype="text" validate="{maxlength:50}" />
			</td>
			<td align="left"></td>
		--%></tr>
	</table>
	<input type="submit" value="保存" id="Button1" class="l-button l-button-submit" />
	</form>
</div>
<div style="float: left;">
	<form name="savePoint" method="post" action="/misc/config/savePoint.htm" id="save_point">
	<table cellpadding="0" cellspacing="0" class="l-table-edit">
		<tr>
			<td align="right" class="l-table-edit-td">
				点评积分奖励分值:
			</td>
			<td align="left" class="l-table-edit-td">
				<input name="disPoint" type="text" id="dis_point" value="${disPoint.value}"/>
			</td>
			<td align="left"></td>
		</tr>
	</table>
	<input type="submit" value="保存" id="ButtonPoint" class="l-button l-button-submit" />
	</form>
</div>
<script type="text/javascript">
	$(function(){
		$.metadata.setType("attr", "validate");
		$("#save_form").validate({
			submitHandler : function(form) {
				$(form).ajaxSubmit({
					dataType : 'text',
					cache : false,
					success : function(data) {
						if(IsNull(data)){
							alert("保存失败！");
						}else{
							alert("保存成功！");
						}
					},
					error : function(err) {
						alert(err);
					}
				});
				return false;
				
				
			}
		});
	})
	 
	$(function(){
		$.metadata.setType("attr", "validate");
			$("#save_point").validate({
				/* rules : {
					disPoint : {
						stringCheck:true
					}
				},
				messages : {
					disPoint : {
						stringCheck: "用户名只能包括中文字、英文字母、数字和下划线"
					}
				}, */
				submitHandler : function(form) {
					$(form).ajaxSubmit({
						dataType : 'text',
						cache : false,
						success : function(data) {
							if(IsNull(data)){
								alert("保存失败！");
							}else{
								alert("保存成功！");
							}
						},
						error : function(err) {
							alert(err);
						}
					});
					return false;
				}
			});
	})
</script>